package la.iok.hzsvn.lewin.movie.obs;

import com.obs.services.model.Multipart;
import com.obs.services.model.SpecialParamEnum;
import la.iok.hzsvn.lewin.movie.model.ObsSignedUrl;
import la.iok.hzsvn.lewin.movie.model.SignUrlParam;

import java.io.File;
import java.io.OutputStream;
import java.util.Collections;
import java.util.List;
import java.util.Map;

public class LocalFileObsService implements ObsService{
    @Override
    public AccessKey getAccessKey(boolean enableWrite) {
        throw new RuntimeException("Not support in local file service");
    }

    @Override
    public ObsSignedUrl signUrlPut(String key) {
        throw new RuntimeException("Not support in local file service");
    }

    @Override
    public ObsSignedUrl signUrlPut(String key, Map<String, Object> params) {
        throw new RuntimeException("Not support in local file service");
    }

    @Override
    public ObsSignedUrl signUrlGet(String key) {
        throw new RuntimeException("Not support in local file service");
    }

    @Override
    public ObsSignedUrl signUrlPost(String key, SpecialParamEnum specialParamEnum) {
        throw new RuntimeException("Not support in local file service");
    }

    @Override
    public ObsSignedUrl signUrlPost(String key, Map<String, String> headers, Map<String, Object> params) {
        throw new RuntimeException("Not support in local file service");
    }

    @Override
    public void uploadFile(String storePath, File file) {

    }

    @Override
    public void downloadFile(String key, OutputStream os) {

    }

    @Override
    public void deleteFile(String key) {

    }

    @Override
    public boolean exist(String key) {
        return false;
    }

    @Override
    public long fileLength(String key) {
        return 0;
    }

    @Override
    public ObsSignedUrl signUrl(SignUrlParam param) {
        throw new RuntimeException("Not support in local file service");
    }

    @Override
    public List<Multipart> loadUploadPart(String key, String uploadId) {
        return Collections.emptyList();
    }
}
